<!-- 添加手机号 -->
<div ng-if="pagedata.show_setmobile" class="popup" id="show_card">
<style>
.fui-cell-group .fui-cell:before {
		border-top: 0 solid #ebebeb;
}
.popup .fui-cell-group .fui-cell .fui-input {
    background: #f7f7f7;
}
</style>
	<div class="popup-body">
    <div class="popup-center" style="width:80%;padding-bottom:1rem">
		<div class="weui_cells_title bold" style="padding:0 0.8rem;font-size:1.3rem;margin-top:0.5rem;margin-bottom:0;color:#000">绑定手机</div>
		<div class="weui_cells_title subtitle" style="padding:0 0.8rem;margin-top:-0.2rem;font-size:0.7rem">为保障您的权益，请输入正确的手机号</div>
		<div class="fui-cell-group fui-cell-click" style="padding:0 0.2rem;">
			<div class="fui-cell">
				<div class="fui-cell-label" style="width:auto">手机号</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="设置手机号" ng-model="pagedata.setmobile.mobile"/></div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-label" style="width:auto">验证码</div>
				<div class="fui-cell-info" style="padding-right:0.3rem"><input type="text" class='fui-input' placeholder="请输入验证码" ng-model="pagedata.setmobile.sms_code"/></div>
				<div class="fui-cell-remark noremark"><a class="btn btn-default btn-default-o btn-sm" ng-click="tool.mobile_code({'mobile':pagedata.setmobile.mobile,'oldmobile':pagedata.setmobile.oldmobile},'sms_code')" id="sms_code">获取验证码</a></div>
			</div>
		</div>
		<div class="fui-cell-group">
                <div class="fui-cell small">
                    <div class="fui-cell-info">
                        <label class="checkbox-inline" style="font-size:0.7rem">
                            <input type="checkbox" value="1" ng-model="pagedata.setmobile.check" class="fui-checkbox-primary" id="agree" ng-checked="pagedata.setmobile.check==1"/> 我已经阅读并了解了<a id="btn-apply" ng-click="pagedata.show_xieyi=true;" style="color:#337ab7;">【{{pagedata.setmobile.xieyi_title || '客户隐私协议'}}】</a>。
                        </label>
                    </div>
                </div>
        </div>
		<button class="weui_btn weui_btn_primary" style="width: 80%;margin-top:1rem" href='javascript:;' ng-click="pagedata.topostmobile();">确认提交</button>
	</div>
	</div>
	<div ng-include="sys_html('common/_xieyi',true)"></div>
	<script type="text/javascript">
	scope.pagedata.setmobile=scope.pagedata.setmobile?scope.pagedata.setmobile:{};
	scope.pagedata.setmobile.login_type=1;
	scope.pagedata.getmobileset=function(){
		scope.get('core/member.login/getxieyi/',function(res){
			scope.pagedata.setmobile.user_xieyi=res.item.user_xieyi;
			scope.pagedata.setmobile.xieyi_title=res.item.xieyi_title;
			scope.$evalAsync();
		});
	}
	scope.pagedata.getmobileset();
	scope.pagedata.topostmobile=function(){
		if(scope.pagedata.setmobile.user_xieyi && scope.pagedata.setmobile.check!=1){
			scope.message('请先阅读协议！');
			return false
		}
		scope.post_json('core/member.set/postmobile/',scope.pagedata.setmobile,function(res){
			scope.pagedata.show_setmobile=false;
			scope.message('绑定成功！')
			window.location.reload();
			scope.$evalAsync();
		})
	}
	</script>
</div>